package org.viva.service.secu;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.viva.core.dao.BaseDAO;
import org.viva.entity.secu.Company;

@Service("companyService")
public class CompanyService {

    @Resource
    private BaseDAO<Company> dao;

    public Company get(Long id) {
        return dao.get(Company.class, id);
    }

    public void save(Company company) {
        if (company == null) return;
        if (company.getId() == null) return;
        Company c = get(company.getId());
        c.setName(company.getName());
    }

}
